<div class="form-group">
    <label class="col-sm-2 control-label">排序</label>
    <div class="col-sm-9 col-xs-12">
        {ife 'sns.board' $item}
        <input type="text" name="displayorder" class="form-control" value="{$item['displayorder']}"/>
        <span class='help-block'>数字越大，排名越靠前</span>
        {else}
        <div class='form-control-static'>{$item['displayorder']}</div>
        {/if}
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label must">分类</label>
    <div class="col-sm-9 col-xs-12">

        {ife 'sns.board' $item}
        <select name='cid' class='form-control' data-rule-required="true">
            <option value=""  {if $item['cid']==''}selected{/if}>--请选择分类--</option>
            {loop $category $c}
            <option value="{$c['id']}" {if $c['id']==$item['cid']}selected{/if}>{$c['name']}</option>
            {/loop}
        </select>
        {else}
        <div class='form-control-static'>

            {loop $category $c}
            {if $c['id']==$item['cid']}{$c['name']}{/if}
            {/loop}
        </div>

        {/if}
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label must">版块名称</label>
    <div class="col-sm-9 col-xs-12 ">
        {ife 'sns.board' $item}
        <input type="text" id='title' name="title" class="form-control" value="{$item['title']}"
               data-rule-required="true"/>
        {else}
        <div class='form-control-static'>{$item['title']}</div>
        {/if}
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label">版块LOGO</label>
    <div class="col-sm-9 col-xs-12">
        {ife 'sns.board' $item}
        {php echo tpl_form_field_image('logo', $item['logo'])}
        <span class='help-block'>建议尺寸:100 * 100 , 请将所有版块LOGO尺寸保持一致</span>
        {else}
        {if !empty($item['logo'])}
        <a href='{php echo tomedia($item[' logo'])}' target='_blank'>
        <img src="{php echo tomedia($item['logo'])}" style='width:100px;border:1px solid #ccc;padding:1px'/>
        </a>
        {/if}
        {/if}
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label">版块描述</label>
    <div class="col-sm-9 col-xs-12">
        {ife 'goods.category' $item}
        <textarea name="desc" class="form-control" cols="70">{$item['desc']}</textarea>
        {else}
        <div class='form-control-static'>{$item['desc']}</div>
        {/if}

    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label">版块Banner</label>
    <div class="col-sm-9 col-xs-12">
        {ife 'sns.board' $item}
        {php echo tpl_form_field_image('banner', $item['banner'])}
        <span class='help-block'>建议尺寸:640 * 320</span>
        {else}
        {if !empty($item['banner'])}
        <a href='{php echo tomedia($item[' banner'])}' target='_blank'>
        <img src="{php echo tomedia($item['banner'])}" style='width:100px;border:1px solid #ccc;padding:1px'/>
        </a>
        {/if}
        {/if}
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label">允许发图</label>
    <div class="col-sm-9 col-xs-12">
        {ife 'sns.board' $item}
        <label class='radio-inline'>
            <input type='radio' name='noimage' value='0' {if $item['noimage']==0}checked{/if} /> 允许
        </label>
        <label class='radio-inline'>
            <input type='radio' name='noimage' value='1' {if $item['noimage']==1}checked{/if} /> 不允许
        </label>
        {else}
        <div class='form-control-static'>{if empty($item['noimage'])}允许{else}不允许{/if}</div>
        {/if}
    </div>
</div>

<!--<div class="form-group">-->
    <!--<label class="col-sm-2 control-label">允许发语音</label>-->
    <!--<div class="col-sm-9 col-xs-12">-->
        <!--{ife 'sns.board' $item}-->
        <!--<label class='radio-inline'>-->
            <!--<input type='radio' name='novoice' value='0' {if $item['novoice']==0}checked{/if} /> 允许-->
        <!--</label>-->
        <!--<label class='radio-inline'>-->
            <!--<input type='radio' name='novoice' value='1' {if $item['novoice']==1}checked{/if} /> 不允许-->
        <!--</label>-->
        <!--{else}-->
        <!--<div class='form-control-static'>{if empty($item['novoice'])}允许{else}不允许{/if}</div>-->
        <!--{/if}-->
    <!--</div>-->
<!--</div>-->
<div class="form-group">
    <label class="col-sm-2 control-label">发帖需要审核</label>
    <div class="col-sm-9 col-xs-12">
        {ife 'sns.board' $item}
        <label class='radio-inline'>
            <input type='radio' name='needcheck' value='1' {if $item['needcheck']==1}checked{/if} /> 需要
        </label>
        <label class='radio-inline'>
            <input type='radio' name='needcheck' value='0' {if $item['needcheck']==0}checked{/if} /> 不需要
        </label>
        {else}
        <div class='form-control-static'>{if empty($item['needcheck'])}不需要{else}需要{/if}</div>
        {/if}
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label">版主发帖需要审核</label>
    <div class="col-sm-9 col-xs-12">
        {ife 'sns.board' $item}
        <label class='radio-inline'>
            <input type='radio' name='needcheckmanager' value='1' {if $item['needcheckmanager']==1}checked{/if} /> 需要
        </label>
        <label class='radio-inline'>
            <input type='radio' name='needcheckmanager' value='0' {if $item['needcheckmanager']==0}checked{/if} /> 不需要
        </label>
        {else}
        <div class='form-control-static'>{if empty($item['needcheckmanager'])}不需要{else}需要{/if}</div>
        {/if}
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label">回帖需要审核</label>
    <div class="col-sm-9 col-xs-12">
        {ife 'sns.board' $item}
        <label class='radio-inline'>
            <input type='radio' name='needcheckreply' value='1' {if $item['needcheckreply']==1}checked{/if} /> 需要
        </label>
        <label class='radio-inline'>
            <input type='radio' name='needcheckreply' value='0' {if $item['needcheckreply']==0}checked{/if} /> 不需要
        </label>
        {else}
        <div class='form-control-static'>{if empty($item['needcheckreply'])}不需要{else}需要{/if}</div>
        {/if}
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label">版主回帖需要审核</label>
    <div class="col-sm-9 col-xs-12">
        {ife 'sns.board' $item}
        <label class='radio-inline'>
            <input type='radio' name='needcheckreplymanager' value='1' {if $item['needcheckreplymanager']==1}checked{/if} /> 需要
        </label>
        <label class='radio-inline'>
            <input type='radio' name='needcheckreplymanager' value='0' {if $item['needcheckreplymanager']==0}checked{/if} /> 不需要
        </label>
        {else}
        <div class='form-control-static'>{if empty($item['needcheckreplymanager'])}不需要{else}需要{/if}</div>
        {/if}
    </div>
</div>


<div class="form-group">
    <label class="col-sm-2 control-label">关键词</label>
    <div class="col-sm-9 col-xs-12">
        {ife 'sns.board' $item}
        <input type="text" name="keyword" class="form-control" value="{$item['keyword']}"/>
        <span class='help-block'>平台回复关键词</span>
        {else}
        <div class='form-control-static'>{$item['keyword']}</div>
        {/if}
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label">是否推荐</label>
    <div class="col-sm-9 col-xs-12">
        {ife 'sns.board' $item}
        <label class='radio-inline'>
            <input type='radio' name='isrecommand' value='1' {if $item['isrecommand']==1}checked{/if} /> 是
        </label>
        <label class='radio-inline'>
            <input type='radio' name='isrecommand' value='0' {if $item['isrecommand']==0}checked{/if} /> 否
        </label>

        {else}
        <div class='form-control-static'>{if empty($item['isrecommand'])}否{else}是{/if}</div>
        {/if}
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label">选择版主</label>
    <div class="col-sm-9 col-xs-12">
        {ife 'sns.board' $item}
        {php echo tpl_selector('openid',array('key'=>'openid','text'=>'nickname','multi'=>1, 'thumb'=>'avatar','placeholder'=>'昵称/姓名/手机号','buttontext'=>'选择会员', 'items'=>$managers,'url'=>webUrl('member/query') ))}
        {else}
        <div class='form-control-static'>
            {loop $managers $m}
            {$m['nickname']};
            {/loop}
        </div>
        {/if}
    </div>
</div>


<div class="form-group">
    <label class="col-sm-2 control-label">状态</label>
    <div class="col-sm-9 col-xs-12">
        {ife 'sns.board' $item}
        <label class='radio-inline'>
            <input type='radio' name='status' value='1' {if $item['status']==1}checked{/if} /> 显示
        </label>
        <label class='radio-inline'>
            <input type='radio' name='status' value='0' {if $item['status']==0}checked{/if} /> 隐藏
        </label>
        {else}
        <div class='form-control-static'>{if empty($item['status'])}隐藏{else}显示{/if}</div>
        {/if}
    </div>
</div>